#ifndef MONO_PARSER_INI_PARSER_H_
#define MONO_PARSER_INI_PARSER_H_
  
#include <istream>
#include <string>
#include <unordered_map>

namespace mono {

class IniParser {
public  :
    // load the ini from a file
    bool loadIniParser(const char* fileName, char delimiter, bool verbose, bool multiline = false);
    // load the ini from an in-core buffer
    bool loadIniParser(std::istream &ist, char delimiter, bool verbose, bool multiline = false);

    std::string getValue(const std::string& key, const std::string& def = "");
    
    const char* getValue(const std::string& key, const char* def = 0);

    int64_t getValue(const std::string& key, int64_t def = 0);

    double getValue(const std::string& key, double def = 0.0);

    void setValue(const std::string& key, const std::string& value);

    void getList(std::string &outBuf, const std::string& linePrefix);
    IniParser();
    IniParser(const IniParser &p);
    ~IniParser();
	
private :
    //Map that holds the (key,value) pairs
    std::unordered_map<std::string, std::string>  _propmap; 

};

}
#endif 
